#!bin/bash
echo "whether you delete SUID,SGID,or SUID and SGID?"
echo "SUID=1,SGID=2,SUID and SGID=3"
read B
if [ $B = 1 ];then
find / -perm +4000 1>/tmp/a
echo "please input row"
echo "null=0"
read A
while [ !$A = 0 ]
do
C=`sed '/'"$A"'/p' -n /tmp/a` 
chmod -s C
echo "delete successfully"
echo "please input row"
echo "null=0"
read A
done
fi
find / -perm +2000 1>/tmp/b
echo "please input row"
echo "null=0"
read A
while [ !$A = 0 ]
do
C=`sed '/'"$A"'/p' -n /tmp/b`
chmod -s C
echo "delete successfully"
echo "please input row"
echo "null=0"
read A
done
fi
if [ $B = 3 ]
find / -perm +6000 1>/tmp/c
echo "please input row"
echo "null=0"
read A
while [ !$A = null ]
do
C=`sed '/'"$A"'/p' -n /tmp/c` 
chmod -s C
echo "delete successfully"
echo "please input row"
echo "null=0"
read A
done
fi
